-- violent
-- created by shuzy
-- 狂暴（尸体越多属性越多）

return {
    apply = function(prop, baseValue)
        return baseValue;
    end,

    -- 每回合触发
    trigger = function(who, prop, base)
        if who.type ~= OBJECT_TYPE_MONSTER then
            return;
        end

        local count = who.killed_count or 0;

        local baseAttrib = base or who.dbase:query(prop[2], 0);
        local violentAttrib = math.max(FormulaM.invoke("CALC_BIG_DIVISION", count * prop[3], baseAttrib, 1000), count);
        return math.max(baseAttrib + violentAttrib, 1);
    end,

    record = function(target, prop, path)
        return false;
    end
};
